<?php

/*

Explore (explore.php)

*/

$page_title = "Explore";
$rank_check = 1;
include "header.inc.php";

print $openHTML;

if (($game != 1) AND ($username != "steve"))
{
	die("

<p>Explore is not ready for users yet. But continue checking back to this page for updates about explore!</p>

<p><b>Updates:</b></p>

<p><B>4/16/04 - Work resumed</b><br>
After a long break work on explore has been resumed! Check back to this page for more updates later!</p>

$closeHTML

	");

}

$findLocation = fetch("SELECT * FROM current_locations WHERE userid = '$userid'");
if (!$findLocation[location])
{
	mysql_query("INSERT INTO current_locations VALUES ('', '$userid', 'world')");
	$findLocation = fetch("SELECT * FROM current_locations WHERE userid = '$userid'");
}

$findMap      = fetch("SELECT * FROM maps WHERE name = '$findLocation[location]'");
if (!$findMap[id])
{
	if ($rank == 7)
	{
		$ifAdmin = "<p><a href=admin/admin_setup_location.php?game=$game&location=$findLocation[location]>Set up this location!</a></p>";
	}

	die("
	<p>The map for this location -- $findLocation[location] -- has not been set up. Please try back later.</p>

$ifAdmin

$closeHTML
	");

}

ECHO <<<END

<p align=center><font size=+2>$findMap[name]</font></p>

<p align=center>
<table cellspacing=0 cellpadding=0 width=300 height=300>
<tr width=100%>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x1y1].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x2y1].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x3y1].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x4y1].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x5y1].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x6y1].gif>
</td>
</tr>
<tr width=100%>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x1y2].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x2y2].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x3y2].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x4y2].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x5y2].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x6y2].gif>
</td>
</tr>
<tr width=100%>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x1y3].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x2y3].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x3y3].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x4y3].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x5y3].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x6y3].gif>
</td>
</tr>
<tr width=100%>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x1y4].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x2y4].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x3y4].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x4y4].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x5y4].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x6y4].gif>
</td>
</tr>
<tr width=100%>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x1y5].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x2y5].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x3y5].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x4y5].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x5y5].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x6y5].gif>
</td>
</tr>
<tr width=100%>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x1y6].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x2y6].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x3y6].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x4y6].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x5y6].gif>
</td>
<td width=50 height=50>
<img src=images/user_images/opg_$game/explore/tiles/$findMap[x6y6].gif>
</td>
</tr>
</table>

END;

print $closeHTML;

?>